﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GalaSoft.MvvmLight;
using System.Windows.Threading;
using System.Windows;

namespace RssReader.ViewModels
{
    public class ViewModelBase:GalaSoft.MvvmLight.ViewModelBase
    {
        private bool _isLoading;
        public virtual bool IsLoading
        {
            get { return _isLoading; }
            set
            {
                if (_isLoading != value)
                {
                    _isLoading = value;
                    this.RaisePropertyChanged("IsLoading");
                }
            }
        }
        protected void InvokeUIDispatcher(Delegate callback, params object[] args)
        {
            Deployment.Current.Dispatcher.BeginInvoke(callback, args);
        }
    }
}
